import VueRouter from 'vue-router'
import NewList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'

import homeContainer from './components/tabbar/HomeContainer.vue'
import vipContainer from './components/tabbar/MemberContainer.vue'
import shopContainer from './components/tabbar/ShopcarContainer.vue'
import searchContainer from './components/tabbar/SearchContainer.vue'

import photo from './components/photo/photo.vue'
import photoinfo from './components/photo/photoinfo.vue'

import goodList from './good/goodList.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [ // 配置路由规则
    {path:'/', redirect:'/home'},
    {path:'/home/NewsList', component:NewList},
    {path:'/home', component:homeContainer},
    {path:'/vip', component:vipContainer},
    {path:'/shopping', component:shopContainer},
    {path:'/search', component:searchContainer},
    {path:'/home/NewsInfo/:id', component:NewsInfo},
    {path:'/home/photo', component:photo},
    {path:'/home/photoinfo/:id', component:photoinfo}
    {path:'/home/goodList', component:goodList}
  ],
  linkActiveClass:"mui-active"
})

// 把路由对象暴露出去
export default router